// vite.config.js
import { defineConfig, loadEnv } from "file:///C:/Users/admin/Desktop/AIchat-main/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/admin/Desktop/AIchat-main/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { fileURLToPath, URL } from "node:url";
var __vite_injected_original_import_meta_url = "file:///C:/Users/admin/Desktop/AIchat-main/vite.config.js";
var vite_config_default = defineConfig(({ mode }) => {
  return {
    plugins: [vue()],
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
      }
    },
    // 设置部署基路径（如生产环境部署到 /chat/）
    base: process.env.VITE_BASE_PATH || "/",
    // 默认根路径
    // vite.config.js 中
    // const target = process.env.NODE_ENV === 'development' 
    // ? 'http://172.166.162.55:5000' 
    // : 'https://your-production-backend.com'; // 生产环境后端地址
    server: {
      host: "0.0.0.0",
      // port:4000,//设置服务启动端口号，是一个可选项，不要设置为本机的端口号，可能会发生冲突
      open: true,
      //是否自动打开浏览器，可选项
      cors: true,
      //允许跨域。
      // 设置代理
      proxy: {
        "/api": {
          // target: 'https://test_ai.kingsha.com/',//这是你要跨域请求的地址前缀
          target: "http://172.166.164.109:5000",
          // target: 'http://172.166.164.112:8002',
          changeOrigin: true,
          //开启跨域
          rewrite: (path) => path.replace(/^\/api/, "")
          //去除前缀api
        }
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          api: "modern-compiler"
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxhZG1pblxcXFxEZXNrdG9wXFxcXEFJY2hhdC1tYWluXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1l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